/***********************************************************************
    filename:   AnimationSakura.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for SakuraRain objects in UI
				one of the animation effects.
*************************************************************************/
#ifndef _AnimationSakura_h_
#define _AnimationSakura_h_

#include "CEGuiSample.h"
#include "CEGUI.h"
#include<string>

class SakuraRain
{
	/*!
	\brief
		SakuraRain is one of the animation effects.
	*/
public:
		/* !
		\brief
			Construct the sample of class SakuraRain.
		*/
	SakuraRain();
	
		/* !
		\brief
			Construct the sample of class SakuraRain.

		\param areaWindow
			- a Window* point to the area that sakura moves.
			
		\param imageWindow
			- a Window* point to the image of sakura.
			
		\param ani_name1
			- one of the animation.
			
		\param ani_name2
			- the other of the animation.
		*/
	SakuraRain(CEGUI::Window* areaWindow,CEGUI::Window* imageWindow,std::string ani_name1,std::string ani_name2);

		/* !
		\brief
			Set the area where sakura moves.

		\param areaWindow
			- a Window* point to the area that sakura moves.
		*/
	void setAreaWindow(CEGUI::Window* areaWindow){_areaWindow = areaWindow;}
	
		/* !
		\brief
			Set the image of sakura.

		\param imageWindow
			- a Window* point to the image of sakura.
		*/
	void setImageWindow(CEGUI::Window* imageWindow){_imageWindow = imageWindow;}
	
		/* !
		\brief
			Get the area where sakura moves.
		*/
	CEGUI::Window* getAreaWindow(){return _areaWindow;}
	
		/* !
		\brief
			Get the image of sakura.
		*/
	CEGUI::Window* getImageWindow(){return _imageWindow;}
		
		/* !
		\brief
			Set the speed of sakura.

		\param s
		*/
	void setSpeed(float s);

//private:
	bool handleDestroy(const CEGUI::EventArgs& e);
	CEGUI::Window* _areaWindow;
	CEGUI::Window* _imageWindow;
	CEGUI::Animation* animation1;
	CEGUI::Animation* animation2;
	CEGUI::AnimationInstance* _ani1;
	CEGUI::AnimationInstance* _ani2;
	std::string aniname1;
	std::string aniname2;
	float speed;

};
#endif